<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: RCapture::CapturedInfo [RDoc Documentation]</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;

    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }

  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )

  // ]]>
  </script>

</head>
<body>


    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">RCapture::CapturedInfo</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>


                <a href="../../files/rcapture/captured_info_rb.html">

                rcapture/captured_info.rb

                </a>


        <br />

            </td>
        </tr>


        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>

                Object

            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">

  <div id="contextContent">

    <div id="description">
      <p>
Holds captured method information and acts as a communicator between
callback and <a href="../RCapture.html">RCapture</a>.
</p>
<h3>Post Capture</h3>
<p>
When called from a method previously captured by <tt>capture_post</tt>, the
following meaning holds true:
</p>
<table>
<tr><td valign="top">args:</td><td>Array of input arguments passed to the method.

</td></tr>
<tr><td valign="top">sender:</td><td>Instance the method was called on.

</td></tr>
<tr><td valign="top">method:</td><td><a href="../Symbol.html">Symbol</a> of method called.

</td></tr>
<tr><td valign="top">return:</td><td>Value returned by method. When modified, the modified value is returned
from the method.

</td></tr>
<tr><td valign="top">block:</td><td>Block passed to method or nil.

</td></tr>
<tr><td valign="top">predicate:</td><td>Unused.

</td></tr>
</table>
<h3>Pre Capture</h3>
<p>
When called from a method that was previously captured by
<tt>capture_pre</tt>, the following meaning holds true:
</p>
<table>
<tr><td valign="top">args:</td><td>Array of input arguments passed to the method. Modifyable.

</td></tr>
<tr><td valign="top">sender:</td><td>Instance the method was called on.

</td></tr>
<tr><td valign="top">method:</td><td><a href="../Symbol.html">Symbol</a> of method called.

</td></tr>
<tr><td valign="top">block:</td><td>Block passed to method or nil.

</td></tr>
<tr><td valign="top">predicate:</td><td>Initially true. If set to false the captured method will not be invoked.

</td></tr>
<tr><td valign="top">return:</td><td>Initially nil. If <tt>predicate</tt> is false, then the value of
<tt>return</tt> is returned from the method.

</td></tr>
</table>

    </div>

   </div>


    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">

        <a href="#M000005">current</a>&nbsp;&nbsp;

        <a href="#M000006">fill</a>&nbsp;&nbsp;

      </div>
    </div>

  </div>

    <!-- if includes -->

    <div id="section">

    <div id="aliases-list">
      <h3 class="section-bar">External Aliases</h3>

      <div class="name-list">
      <table summary="aliases">

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">args</td>
          <td>-&gt;</td>
          <td class="context-item-value">a</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">sender</td>
          <td>-&gt;</td>
          <td class="context-item-value">s</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">method</td>
          <td>-&gt;</td>
          <td class="context-item-value">m</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">return</td>
          <td>-&gt;</td>
          <td class="context-item-value">r</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">return</td>
          <td>-&gt;</td>
          <td class="context-item-value">r=</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">block</td>
          <td>-&gt;</td>
          <td class="context-item-value">b</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">predicate</td>
          <td>-&gt;</td>
          <td class="context-item-value">p</td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">predicate=</td>
          <td>-&gt;</td>
          <td class="context-item-value">p=</td>
        </tr>

        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">args</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">block</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">method</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">predicate</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">return</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        <tr class="top-aligned-row context-row">
          <td class="context-item-name">sender</td>

          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>

          <td class="context-item-desc"></td>
        </tr>

        </table>
      </div>
    </div>


    <!-- if method_list -->

    <div id="methods">

      <h3 class="section-bar">Public Class methods</h3>


      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">

          <a href="#M000005" class="method-signature">

          <span class="method-name">current</span><span class="method-args">()</span>

          </a>

        </div>

        <div class="method-description">

          <p>
Access thread-local <a href="CapturedInfo.html">CapturedInfo</a> variable
</p>

          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000005-source">
<pre>
<span class="ruby-comment cmt"># File rcapture/captured_info.rb, line 39</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-constant">CapturedInfo</span>.<span class="ruby-identifier">current</span>
      <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:captured_info</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">CapturedInfo</span>.<span class="ruby-identifier">new</span>
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>

        </div>
      </div>


      <h3 class="section-bar">Public Instance methods</h3>


      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">

          <a href="#M000006" class="method-signature">

          <span class="method-name">fill</span><span class="method-args">(args, sender, method, block = nil, ret = nil)</span>

          </a>

        </div>

        <div class="method-description">

          <p>
Fill with values
</p>

          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000006-source">
<pre>
<span class="ruby-comment cmt"># File rcapture/captured_info.rb, line 44</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fill</span>(<span class="ruby-identifier">args</span>, <span class="ruby-identifier">sender</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">block</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">nil</span>)
      <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">args</span>
      <span class="ruby-ivar">@sender</span> = <span class="ruby-identifier">sender</span>
      <span class="ruby-ivar">@method</span> = <span class="ruby-identifier">method</span>
      <span class="ruby-ivar">@return</span> = <span class="ruby-identifier">ret</span>
      <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">block</span>
      <span class="ruby-ivar">@predicate</span> = <span class="ruby-keyword kw">true</span>
    <span class="ruby-keyword kw">end</span>
</pre>
          </div>

        </div>
      </div>



    </div>




  </div>

<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>
